package com.sms.service.impl;

import com.sms.dao.CourseResultMapper;
import com.sms.pojo.CourseInfo;
import com.sms.pojo.CourseResult;
import com.sms.service.CourseResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseResultServiceImpl implements CourseResultService {

    @Autowired
    private CourseResultMapper courseResultMapper;

    @Override
    public int insertCourseResult(CourseResult courseResult) {
        return courseResultMapper.insertCourseResult(courseResult);
    }

    @Override
    public int updateCourseResult(CourseResult courseResult) {
        return courseResultMapper.updateCourseResult(courseResult);
    }

    @Override
    public int deleteCourseResult(Integer sid, Integer courseid) {
        return courseResultMapper.deleteCourseResult(sid,courseid);
    }

    @Override
    public List<CourseResult> selectCourseResultBySid(Integer sid) {
        return courseResultMapper.selectCourseResultBySid(sid);
    }


    @Override
    public List<CourseInfo> pickCourses(Integer sid){
        return courseResultMapper.pickCourses(sid);
    }

    @Override
    public CourseResult selectCourseResultById(Integer sid, Integer courseid) {
        return courseResultMapper.selectCourseResultById(sid,courseid);
    }

    @Override
    public List<CourseResult> selectCourseResultAll() {
        return courseResultMapper.selectCourseResultAll();
    }
}
